﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-trasitional.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<script src="~/aa/vue/dist/vue.js"></script>
	<script src="~/aa/element-ui/lib/index.js"></script>
	<link href="~/aa/element-ui/lib/theme-chalk/index.css" rel="stylesheet" />
	<script src="~/aa/axios/dist/axios.js"></script>
	<link rel="stylesheet" href="../../css/table.css" type="text/css" />
	<title>无标题文档</title>
	<style type="text/css">
		body {
			background: rgb(253,244,227);
		}

		.TD_STYLE1 {
			background: #E6DDCE;
			/* color:white; */
		}

		.TD_STYLE2 {
			background: rgb(253,244,227);
		}

		.INPUT_STYLE2 {
			background: rgb(253,244,227);
		}
	</style>
</head>

<body>
	<div id="SG">
		<form method="post" action="">
			<table width="100%">
				<tr>
					<td style="text-align:left;">
						<font color="black">您正在做的业务是:人力资源管理--薪酬发放管理--薪酬发放登记审核</font>
						<br /><br /><br />
					</td>
				</tr>
			</table>

			<table width="100%" border="1" cellpadding=0 cellspacing=1
				   bordercolorlight=#848284 bordercolordark=#eeeeee
				   class="TABLE_STYLE1">
				<template>
					<el-table :data="list"
							  border
							  style="width: 100%">
						<el-table-column prop="sgrId"
										 label="编号"
										 v-if="false"
										 width="180">
						</el-table-column>
						<el-table-column prop="salaryGrantId"
										 label="薪酬编号"
										 width="180">
						</el-table-column>
						<el-table-column prop="salaryStandardId"
										 label="薪酬编号"
										 v-if="false"
										 width="180">
						</el-table-column>
						<el-table-column prop="firstKindName"
										 label="I级机构名称"
										 width="180">
						</el-table-column>
						<el-table-column prop="secondKindName"
										 label="II级机构名称">
						</el-table-column>
						<el-table-column prop="thirdKindName"
										 label="III级机构名称">
						</el-table-column>
						<el-table-column prop="humanAmount"
										 label="人数">
						</el-table-column>
						<el-table-column prop="salaryStandardSum"
										 label="基本薪酬总额(元)">
						</el-table-column>
						<el-table-column prop="cz"
										 label="复核">
							<template slot-scope="scope">
								<span v-if="scope.row.checkStatus==0">
									<a :href="`@Url.Action("FHUpdate","SG")?id=${scope.row.salaryGrantId}`"
									   target="mainFrame"
									   v-on:click="fh(scope)"
									   style="color:black;">
										复核
									</a>
								</span>
								<span v-if="scope.row.checkStatus==1" :disabled="true">已复核</span>
							</template>
						</el-table-column>
					</el-table>
				</template>

			</table>
			<el-pagination v-on:size-change="handleSizeChange"
						   v-on:current-change="handleCurrentChange"
						   :currentpage="currentPage"
						   :page-sizes="[2, 4, 6, 8]"
						   :page-size="pageSize"
						   layout="total, sizes, prev, pager, next, jumper"
						   :total="rows">
			</el-pagination>
		</form>
	</div>
</body>
</html>
<script type="text/javascript">
	var vm = new Vue({
		el: "#SG",
		data: {
			list: [],
			currentPage: 1,
			pageSize: 2,
			rows: 1,
			salaryStandardId: "",
			salaryGrantId: "",
			humanAmount: "",
		},
		methods: {
			fill: function () {
				axios.get("/SG/GetIndex", {
					params: {
						pageIndex: this.currentPage,
						pageSize: this.pageSize,
					}
				}).then(res => {
					this.list = res.data.list;
					this.rows = res.data.rows;
					console.log(res.data.list);
					console.log(res.data.rows);
				}).catch(err => {
					console.log(err);
				})
			},
			handleSizeChange: function (val) {
				this.pageSize = val;
				this.fill();
			},
			handleCurrentChange: function (val) {
				this.currentPage = val;
				this.fill();
			},
			fh(scope) {
				localStorage.setItem("salaryGrantId", scope.row.salaryGrantId);
				localStorage.setItem("humanAmount:", scope.row.humanAmount);
				console.log("人" + scope.row.humanAmount);
				localStorage.setItem("salaryStandardId", scope.row.salaryStandardId);
				console.log("salaryStandardId:" + scope.row.salaryStandardId);
			}
		},
		mounted: function () {
			this.fill();

		}
	});
</script>